//
//  VideoView.h
//  kanhujia
//
//  Created by lxl on 2018/5/15.
//  Copyright © 2018年 lxl. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

@interface VideoView : UIView
@property (nonatomic ,strong) NSString *filePath;

@property (nonatomic ,readonly) AVPlayerItem *item;

@property (nonatomic ,readonly) AVPlayerLayer *playerLayer;

@property (nonatomic ,readonly) AVPlayer *player;

/**
 *  播放时间回调
 */
@property (nonatomic) void(^flushCurrentTimeBlock)(NSString *timeString, CGFloat sliderValue);
/**
 *  播放完成回调
 */
@property (nonatomic) void(^playerEndBlock)(void);
/**
 *  创建音视频View
 *
 *  @pram  filePath   文件路径
 *  @pram  isLocality 是否是本地音视频
 */
- (instancetype)initWithFilePath:(NSString *)filePath isLocality:(BOOL)isLocality;
- (void)stopPlayer;
@end

@interface VideoView  (Guester)

- (void)addSwipeView;

@end
